package com.framework.init;

import java.io.File;

import javax.servlet.ServletConfig;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;

import org.apache.log4j.Logger;

@SuppressWarnings("serial")
public class Boot extends HttpServlet
{

	private static final Logger logger = Logger.getLogger(Boot.class);

	@Override
	public void init(ServletConfig config) throws ServletException {
		super.init(config);
		logger.info("Server booting...");
		logger.info("OS Name:" + System.getProperty("os.name"));
		logger.info("OS Version:" + System.getProperty("os.version"));
		logger.info("OS Architecture:" + System.getProperty("os.arch"));
		logger.info("CPU Maybe:" + System.getProperty("sun.cpu.isalist"));
		logger.info("JRE Version:" + System.getProperty("java.version"));
		logger.info("JRE Runtime:" + System.getProperty("java.runtime.version"));
		java.net.URL url = getClass().getClassLoader().getResource("/");
		String SERVER_PATH = new File(url.getPath()).getParent() + File.separator;
		logger.info("SERVER_PATH:" + SERVER_PATH);	
	}

}
